package 二分;

/**
 * @author: TTDB
 * @create: 2025/9/21
 */
public class findMin {
    public int findMin(int[] nums){
        int n = nums.length;
        int l = -1, r = nums.length -1;
        while(l+1 < r){
            int m = (l+r) >>> 1;
            if(nums[m] < nums[n - 1]){
                r = m;
            }else{
                l =m;
            }
        }
        return nums[r];
    }
}
